/**
 * 
 */
package com.feib.stms.service;

import org.springframework.transaction.annotation.Transactional;

import com.feib.stms.model.PreDesignatedAccount;

/**
 * @author Karl Chen
 *
 */
@Transactional(readOnly = true)
public interface PreDesignatedAccountService 
{
	/**
	 * 根據分公司代號查詢約定帳號
	 * @param securitiesNo
	 * @param bankBracnchNo TODO
	 * @return
	 */
	public PreDesignatedAccount getPreDesignatedAccountBySecuritiesNo(String securitiesNo, String bankBracnchNo);
	
	/**
	 * 根據分公司代號及群組Pk查詢約定帳號
	 * @param securitiesNo
	 * @param groupPk
	 * @param bankBracnchNo TODO
	 * @return
	 */
	public PreDesignatedAccount getPreDesignatedAccountBySecuritiesNoAndGroupPk(String securitiesNo, Long groupPk, String bankBracnchNo);
	
	/**
	 * 新增券商約定帳號
	 * @return
	 */
	public int insert(PreDesignatedAccount preDesignatedAccount);
	
	/**
	 * 更新券商約定帳號
	 * @param preDesignatedAccountPk 更新前券商約定帳號資料的主鍵 
	 * @param preDesignatedAccount 更新后券商約定帳號資料
	 * @return
	 */
	public int update(Long preDesignatedAccountPk,PreDesignatedAccount preDesignatedAccount);
}
